// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init({
  env:'cloud1-0g9faihx8985932d'
})

// 云函数入口函数
exports.main = async (event, context) => {
  const wxContext = cloud.getWXContext()

  return cloud.database().collection('studyRecords')
  .doc(event.id)
  .update({
    proTex: Math.ceil(item.pro*1000)/100,
    fenshu:event.fenshu,
    sum:event.sum,
    oldTime1:event.oldTime1,
    newTime1:event.oldTime1
  })
}